package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户分享记录表
 * </p>
 *
 * @author jiangzhuan
 * @since 2021-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("member_share_record")
public class MemberShareRecord extends Model<MemberShareRecord> {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 分享类型 1、微信好友 2、朋友圈。 3、QQ, 4、新浪
     */
    @NotNull(message = "type is required")
    private Integer type;

    /**
     * 用户id
     */
    private Integer memberId;

    /**
     * 分享标题
     */

    private String title;

    /**
     * 分享链接
     */
    @NotNull(message = "url is required")
    private String url;

    /**
     * 逻辑删除 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    public static final String ID = "id";

    public static final String TYPE = "type";

    public static final String MEMBER_ID = "member_id";

    public static final String TITLE = "title";

    public static final String URL = "url";

    public static final String DELETED = "deleted";

    public static final String CREATE_TIME = "create_time";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
